# -*- coding: utf-8 -*-

import autopy3 as autopy
# autopy.key.tap(u'q')
# autopy.key.type_string("asdf")
# autopy.key.tap(long(autopy.key.K_DELETE), long(autopy.key.MOD_SHIFT))
# autopy.key.toggle(long(autopy.key.K_DELETE), True)
# autopy.key.toggle(long(0x00), True, long(autopy.key.MOD_SHIFT) | long(autopy.key.MOD_ALT))
# autopy.mouse.click() # 单击
# autopy.mouse.toggle(True) # 按下左键
# autopy.mouse.toggle(False) # 松开左键

# autopy.color.hex_to_rgb(autopy.screen.get_color(1, 1))#


autopy.bitmap.capture_screen().save('screengrab.png')

qq=autopy.screen.get_size()# 返回主屏幕大小的元组

autopy.screen.point_visible(qq[0],qq[1])#如果给定点在主屏幕边界内， 则返回True

print (qq)
